﻿using Algorithms;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;

namespace UnitTests
{
    
    
    /// <summary>
    ///This is a test class for KdTreeTest and is intended
    ///to contain all KdTreeTest Unit Tests
    ///</summary>
    [TestClass()]
    public class KdTreeTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for KdTree Constructor
        ///</summary>
        [TestMethod()]
        public void KdTreeConstructorTest()
        {
            KdTree target = new KdTree();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for InorderTraversal
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void InorderTraversalTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            string separator = string.Empty; // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.InorderTraversal(current, separator);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for InorderTraversalBuildup
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void InorderTraversalBuildupTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            List<KdTreeNode<Point2D>> contents = null; // TODO: Initialize to an appropriate value
            target.InorderTraversalBuildup(current, contents);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for Insert
        ///</summary>
        [TestMethod()]
        public void InsertTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            Point2D p = null; // TODO: Initialize to an appropriate value
            target.Insert(p);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for PostorderTraversal
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void PostorderTraversalTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            string separator = string.Empty; // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.PostorderTraversal(current, separator);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for PreorderTraversal
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void PreorderTraversalTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            string separator = string.Empty; // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.PreorderTraversal(current, separator);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for SearchHelper
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void SearchHelperTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            Point2D data = null; // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> expected = null; // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> actual;
            actual = target.SearchHelper(current, data);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ToString
        ///</summary>
        [TestMethod()]
        public void ToStringTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.ToString();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ToString
        ///</summary>
        [TestMethod()]
        public void ToStringTest1()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            TraversalMethods traversalMethod = new TraversalMethods(); // TODO: Initialize to an appropriate value
            string separator = string.Empty; // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.ToString(traversalMethod, separator);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ToString
        ///</summary>
        [TestMethod()]
        public void ToStringTest2()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            TraversalMethods traversalMethod = new TraversalMethods(); // TODO: Initialize to an appropriate value
            string expected = string.Empty; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.ToString(traversalMethod);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for contains
        ///</summary>
        [TestMethod()]
        public void containsTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            Point2D p = null; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.contains(p);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for createRectangle
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void createRectangleTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            bool isVerticalLine = false; // TODO: Initialize to an appropriate value
            bool isLeftChild = false; // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> parent = null; // TODO: Initialize to an appropriate value
            RectHV expected = null; // TODO: Initialize to an appropriate value
            RectHV actual;
            actual = target.createRectangle(isVerticalLine, isLeftChild, parent);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for euclideanDistance
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void euclideanDistanceTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            Point2D p1 = null; // TODO: Initialize to an appropriate value
            Point2D p2 = null; // TODO: Initialize to an appropriate value
            double expected = 0F; // TODO: Initialize to an appropriate value
            double actual;
            actual = target.euclideanDistance(p1, p2);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for euclideanDistance
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void euclideanDistanceTest1()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            double x0 = 0F; // TODO: Initialize to an appropriate value
            double y0 = 0F; // TODO: Initialize to an appropriate value
            double x1 = 0F; // TODO: Initialize to an appropriate value
            double y1 = 0F; // TODO: Initialize to an appropriate value
            double expected = 0F; // TODO: Initialize to an appropriate value
            double actual;
            actual = target.euclideanDistance(x0, y0, x1, y1);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for isEmpty
        ///</summary>
        [TestMethod()]
        public void isEmptyTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.isEmpty();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for iterator
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void iteratorTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            List<KdTreeNode<Point2D>> expected = null; // TODO: Initialize to an appropriate value
            List<KdTreeNode<Point2D>> actual;
            actual = target.iterator();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for nearest
        ///</summary>
        [TestMethod()]
        public void nearestTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            Point2D p = null; // TODO: Initialize to an appropriate value
            Point2D expected = null; // TODO: Initialize to an appropriate value
            Point2D actual;
            actual = target.nearest(p);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for range
        ///</summary>
        [TestMethod()]
        public void rangeTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            RectHV rect = null; // TODO: Initialize to an appropriate value
            IEnumerable<Point2D> expected = null; // TODO: Initialize to an appropriate value
            IEnumerable<Point2D> actual;
            actual = target.range(rect);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for searchNearestNeighbor
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void searchNearestNeighborTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            double targetX = 0F; // TODO: Initialize to an appropriate value
            double targetY = 0F; // TODO: Initialize to an appropriate value
            Point2D pt = null; // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            NodeState_Accessor closestNode = null; // TODO: Initialize to an appropriate value
            NodeState_Accessor expected = null; // TODO: Initialize to an appropriate value
            NodeState_Accessor actual;
            actual = target.searchNearestNeighbor(targetX, targetY, pt, current, closestNode);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for searchWithRange
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Algorithms.exe")]
        public void searchWithRangeTest()
        {
            KdTree_Accessor target = new KdTree_Accessor(); // TODO: Initialize to an appropriate value
            double xmin = 0F; // TODO: Initialize to an appropriate value
            double ymin = 0F; // TODO: Initialize to an appropriate value
            double xmax = 0F; // TODO: Initialize to an appropriate value
            double ymax = 0F; // TODO: Initialize to an appropriate value
            KdTreeNode<Point2D> current = null; // TODO: Initialize to an appropriate value
            List<Point2D> contents = null; // TODO: Initialize to an appropriate value
            target.searchWithRange(xmin, ymin, xmax, ymax, current, contents);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for size
        ///</summary>
        [TestMethod()]
        public void sizeTest()
        {
            KdTree target = new KdTree(); // TODO: Initialize to an appropriate value
            int expected = 0; // TODO: Initialize to an appropriate value
            int actual;
            actual = target.size();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
